﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using IDAL;
using Model;
using Factory;

namespace BLL
{
    public class B_AdminsUser : IAdminUser
    {
        public void Add(AdminUser obj)
        {
            CreateFactory.GetAdminUser().Add(obj);
        }

        public void Delete(int id)
        {
            CreateFactory.GetAdminUser().Delete(id);
        }

        public AdminUser FindById(int id)
        {
            return CreateFactory.GetAdminUser().FindById(id);
        }

        public List<AdminUser> GetAll()
        {
            return CreateFactory.GetAdminUser().GetAll();
        }

        public AdminUser Login(string username, string password)
        {
            return CreateFactory.GetAdminUser().Login(username, password);
        }

        public void Update(int id, AdminUser obj)
        {
            CreateFactory.GetAdminUser().Update(id,obj);
        }

        public int UpPass(int id, string passwod)
        {
            return CreateFactory.GetAdminUser().UpPass(id, passwod);
        }
    }
}
